using System;
using AbpStudy.Enums;
using Volo.Abp.Domain.Entities.Auditing;

namespace AbpStudy.Entity
{
	/// <summary>
	/// 测试用 book
	/// </summary>
	public class Book : AuditedAggregateRoot<Guid>
	{
		public string Name { get; set; }

		public BookType Type { get; set; }

		public DateTime PublishDate { get; set; }

		public float Price { get; set; }	
		public Author Author { get; set; }
		public Guid AuthorId { get; set; }
		

        protected Book()
        {
        }

        public Book(
            Guid id,
            string name,
            BookType type,
            DateTime publishDate,
            float price
        ) : base(id)
        {
            Name = name;
            Type = type;
            PublishDate = publishDate;
            Price = price;
        }

        public Book(
            Guid id,
            string name,
            BookType type,
            DateTime publishDate,
            float price,
            Author author,
            Guid authorId
        ) : base(id)
        {
            Name = name;
            Type = type;
            PublishDate = publishDate;
            Price = price;
            Author = author;
            AuthorId = authorId;
        }
	}
}
